import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-10-30
 * Time: 16:31
 */
public class Test {
/*    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int num = scanner.nextInt();
        int count = 0;
        while(num != 0){
            num &= (num-1);
            count++;
        }
        System.out.println("num二进制中1的个数为:"+count);
    }*/
   /* public static void main(String[] args) {
        //自幂数
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
            //判断是否为自幂数
            for (int i= 1; i <num ; i++) {
                int count = 0;//记录有几位数的
                //判断有几位数
                int ret = i;
                while(ret != 0){
                    ret /= 10;
                    count++;
                }
                //判断自幂数
                int tmp = i;
                int sum = 0;
                while(tmp!=0){
                    sum += Math.pow((tmp % 10),count);
                    tmp /= 10;
                }
                if(sum ==i ){
                    System.out.println(i+"为自幂数");
                }
            }
    }*/
    /*public static void main(String[] args) {
        //水仙花数
        for (int i = 100; i <1000 ; i++) {
            int sum = 0;
            int tmp = i;
            while(tmp!=0){
                sum += Math.pow((tmp % 10),3);
                tmp /= 10;
            }
            if(sum ==i ){
                System.out.println(i+"为水仙花数");
            }
        }
    }*/
    /*public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()){
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = a % b;
            while( c != 0){
                a = b;
                b = c;
                c= a % b;
            }
            System.out.println("最大的公约数为:"+b);
        }
    }*/
    /*public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNextInt()){
            int age = scanner.nextInt();
            if(age<=18){
                System.out.println("少年");
            } else if(age<=28){
                System.out.println("青年");
            } else if (age<=55) {
                System.out.println("中年");
            }
            else {
                System.out.println("老年");
            }
        }

    }*/
}
